package com.petsbang.action;

import com.petsbang.common.Common;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class MainActivity extends Activity {
	
	private ImageView pic_bg_0;
	private ImageView pic_bg_1;
	private ImageView pic_bg_2;
//	private ImageView pic_bg_3;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);

		pic_bg_0 = (ImageView) findViewById(R.id.pic_bg_0);
		pic_bg_0.setOnClickListener(listenerHeavy);
		
		pic_bg_1 = (ImageView) findViewById(R.id.pic_bg_1);
		pic_bg_1.setOnClickListener(listenerCarton);
		
		pic_bg_2 = (ImageView) findViewById(R.id.pic_bg_2);
		pic_bg_2.setOnClickListener(listenerMeng);
		
//		
//		pic_bg_3 = (ImageView) findViewById(R.id.pic_bg_3);
//		pic_bg_3.setOnClickListener(listener3);
		
	}
	
	/**
	 * 	
	 */
	ImageView.OnClickListener listenerHeavy = new ImageView.OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent();
			Bundle bundle = new Bundle();
			bundle.putString("PictureTag", Common.TAG_HEAVY);
			bundle.putString("ServerUrl", Common.STR_HEAVY_URL);
			intent.putExtras(bundle);
			intent.setClass(MainActivity.this, PetsMainActivity.class);
			startActivity(intent);
		}
	};
	
	/**
	 * 	
	 */
	ImageView.OnClickListener listenerCarton = new ImageView.OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent();
			Bundle bundle = new Bundle();
			bundle.putString("PictureTag", Common.TAG_CARTON);
			bundle.putString("ServerUrl", Common.STR_CORTON_URL);
			intent.putExtras(bundle);
			intent.setClass(MainActivity.this, PetsMainActivity.class);
			startActivity(intent);
		}
	};
	
	/**
	 * 	
	 */
	ImageView.OnClickListener listenerMeng = new ImageView.OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent();
			Bundle bundle = new Bundle();
			bundle.putString("PictureTag", Common.TAG_MENG);
			bundle.putString("ServerUrl", Common.STR_MENG_URL);
			intent.putExtras(bundle);
			intent.setClass(MainActivity.this, PetsMainActivity.class);
			startActivity(intent);
		}
	};
	
	/**
	 * 	
	 */
	ImageView.OnClickListener listenerStart = new ImageView.OnClickListener(){

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent();
			intent.setClass(MainActivity.this, PetsMainActivity.class);
			startActivity(intent);
		}
	};

	
	@Override
	protected void onDestroy() {
		super.onDestroy();
		// 清除信息
		
	}


}